package club.xyes.zkh.ecommerce.controller.api;

import club.xyes.zkh.ecommerce.common.entity.User;
import club.xyes.zkh.ecommerce.common.vo.GeneralResult;
import club.xyes.zkh.ecommerce.controller.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * Create by 郭文梁 2019/4/15 0015 18:13
 * WeixinLoginController
 * 威信登录相关API
 *
 * @author 郭文梁
 * @data 2019/4/15 0015
 */
@RestController
@RequestMapping("/api/wxlogin")
@Api("微信登录相关API")
public class WeixinLoginController extends BaseController<User> {
    /**
     * 微信小程序登录API
     *
     * @param code 临时Code
     * @return GeneralResult with User entity
     */
    @ApiOperation("微信小程序登录")
    @PostMapping("/login")
    public GeneralResult<User> login(@ApiParam("临时Code") @RequestParam("code") String code) {
        return GeneralResult.error("Not support");
    }
}
